﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace StackAttack_WindowsFormApp.Helper_Forms
{
    public partial class EnterNameForm : Form
    {
        MainApp application;
        public EnterNameForm(MainApp app)
        {
            application = app;
            InitializeComponent();
        }

        private void acceptPlayerName_Click(object sender, EventArgs e)
        {
            if (playerName.Text == "")
            {
                MessageBox.Show("Please, enter your name.");
            }
            else
            {
                application.playerName.Text = this.playerName.Text;
                this.Close();
            }
            
        }
    }
}
